#ifndef __LS2X_H
#define __LS2X_H

#define LS2X_CORE_IPI_BASE		0x1fe01000
#define LS2X_ENTRY_BASE			0x1fe01400
#define LS2X_INTC_BASE			0x1fe01420
#define LS2X_APB_BASE			0x1fe20000

#define LS2X_COMMON_CONF0		0x1fe00420
#define LS2X_COMMON_CONF1		0x1fe00428
#define LS2X_COMMON_CONF2		0x1fe00430
#define LS2X_APB_DMA_CFG		0x1fe00438
#define LS2X_APB_DMA_BASE		0x1fe00c00
#define LS2X_SATA_PHY_CFG		0x1fe00450

#define LS2X_CPU_WIN0_MMAP		0x1fe02080

#define LS2X_CPU_WIN0_BASE		0x1fe02000	//cache通路二级窗口0的基地址
#define LS2X_CPU_WIN0_MASK		0x1fe02040	//cache通路二级窗口0的掩码
#define LS2X_CPU_WIN0_MMAP		0x1fe02080	//cache通路二级窗口0的新基地址

#define LS2X_XBAR_WIN5_BASE		0x1fe02500	//PCIE设备DMA访问窗口基地址0
#define LS2X_XBAR_WIN5_MASK		0x1fe02540	//PCIE设备DMA访问窗口掩码0
#define LS2X_XBAR_WIN5_MMAP		0x1fe02580	//PCIE设备DMA访问窗口新基地址0

#define LS2X_PCIE0_CONF0		0x1fe00580
#define LS2X_PCIE0_CONF1		0x1fe00588
#define LS2X_PCIE0_PHY			0x1fe00590
#define LS2X_PCIE1_CONF0		0x1fe005a0
#define LS2X_PCIE1_CONF1		0x1fe005a8
#define LS2X_PCIE1_PHY			0x1fe005b0

#define LS2X_TYPE0_ADDR			0x1a000000
#define LS2X_TYPE1_ADDR			0x1b000000

#define LS2X_MUX_BASE			0x1fe00420
#define LS2X_USB_PHY_BASE		0x1fe00440
#define LS2X_PLL_BASE			0x1fe00480
#define LS2X_PIXPLL_BASE		0x1fe004b0
#define LS2X_GPIO_BASE			0x1fe00500

#define LS2X_UART0_BASE			0x1fe20000
#define LS2X_NAND_BASE			0x1fe26000
#define LS2X_RTC_BASE			0x1fe27800
#define LS2X_SPI0_BASE			0x1fff0220
#define LS2X_I2C0_BASE			0x1fe21000
#define LS2X_I2C1_BASE			0x1fe21800
#define LS2X_PWM0_BASE			0x1fe22000
#define LS2X_PWM1_BASE			0x1fe22010
#define LS2X_PWM2_BASE			0x1fe22020
#define LS2X_PWM3_BASE			0x1fe22030

/* display controller */
#define LS2X_DC0_BASE			0xb0101240
#define LS2X_DC1_BASE			0xb0101250
#define LS2X_CURSOR_BASE		0xb0101520

#define LS2X_SDIO_BASE			0x1fe2c000

#define DDR_CONF_SPACE		PHYS_TO_UNCACHED(0x0ff00000)

#define UART0_OFF	0x0
#define ACPI_OFF	0x7000

#define LS_SCACHE_LOCK_WIN0_BASE    PHYS_TO_UNCACHED(0x1fe00200)
#define LS_SCACHE_LOCK_WIN1_BASE    PHYS_TO_UNCACHED(0x1fe00208)
#define LS_SCACHE_LOCK_WIN2_BASE    PHYS_TO_UNCACHED(0x1fe00210)
#define LS_SCACHE_LOCK_WIN3_BASE    PHYS_TO_UNCACHED(0x1fe00218)
#define LS_SCACHE_LOCK_WIN0_MASK    PHYS_TO_UNCACHED(0x1fe00240)
#define LS_SCACHE_LOCK_WIN1_MASK    PHYS_TO_UNCACHED(0x1fe00248)
#define LS_SCACHE_LOCK_WIN2_MASK    PHYS_TO_UNCACHED(0x1fe00250)
#define LS_SCACHE_LOCK_WIN3_MASK    PHYS_TO_UNCACHED(0x1fe00258)

#include "regs-clk.h"
#include "pm.h"

#endif
